package org.tea.inventory.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @author hanzy
 * @description 帖子回复审核状态枚举
 * @date 2023年04月06日 14:03
 */
public enum PostCommentStatusEnum {
    START(0, "待互动"),
    RUNNING(1, "待审核"),
    CANCEL(2, "作废"),
    PASS(3, "通过")
    ;

    @Getter
    @Setter
    private Integer code;
    @Getter
    @Setter
    private String content;

    PostCommentStatusEnum(Integer code, String content) {
        this.code = code;
        this.content = content;
    }

    public static String getContentByName(Integer code) {
        for (PostCommentStatusEnum actCategoryEnum : PostCommentStatusEnum.values()) {
            if (actCategoryEnum.getCode() == code) {
                return actCategoryEnum.getContent();
            }
        }
        return "";
    }
}
